<%@page import="com.wodwl.entity.Resource"%>
<%@page import="com.wodwl.entity.User"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<script type="text/javascript" src="../../static/ckeditor/ckeditor.js"></script>
	<%@include file="../templete/head.jsp"  %>
	<style type="text/css">
		
		.mainRight .btn{
			float: right;
			margin-right: 5px;
		}
		
		.content ul{
			list-style-type: none;
			display: block;
		}
		.content ul li{
			height: 120px;
		}
		.bar span{
			display:inline-block;
			margin-right: 10px;
		}
		.content .title{
			font-size: 24px;
		}
		
		
		.content .con{
			clear:both;
			padding:7px 0 5px 0;
			height: 50px;
			width: 80%;
			overflow: hidden;
		}
		.content .op{
			float: right;
		}
	</style>
</head>
<body >
	<%pageContext.setAttribute("linkType", "2");%>
	<%@include file="../templete/banner.jsp"  %>

	<div class="mainRight">
		<div class="mainRightBar">
			<div class="title">上传资源</div>
		</div>
		<div class="content">
			<form action="/resource/resource_add.do" method="post" enctype="multipart/form-data" class="myform">
				<input type="hidden" name="path" value="<%=request.getAttribute("path")%>">
				<table>
					<tr>
						<td>资源名称：</td><td><input type="text" name="name" ></td>
					</tr>
					<tr>
						<td>选择文件：</td><td><input type="file" name="file" ></td>
					</tr>
					<tr>
						<td>系统分类：</td>
						<td>
							<select name="category">
								<option value="<%=Resource.Category.Technogly%>"selected="selected">技术</option>
								<option value="<%=Resource.Category.Paper %>" >论文</option>
								<option value="<%=Resource.Category.Counseling%>">辅导</option>
								<option value="<%=Resource.Category.Entertainment%>">娱乐</option>
								<option value="<%=Resource.Category.Other%>">其它</option>
							</select>
						</td>
					
					</tr>
					<tr>
						<td>关键字：</td><td><input type="text" name="tag" ></td>
					</tr>
					<tr>
						<td colspan="2">
							资源描述：<br/>
							<textarea name="description"  id="description"></textarea>
						</td>
					</tr>
					<tr>
						<td colspan="2">
							<div class="submit_btn">提交</div>
						</td>
					</tr>
				</table>
			</form>
		</div>

	</div>
</div>

<%@include file="../templete/footer.jsp"  %>
	
<script type="text/javascript">
	$(document).ready(function(){
		$(".submit_btn").button();
		$(".submit_btn").click(function(){
			$(".myform").submit();
			$(this).button( "option", "disabled", true );
		});
		
		CKEDITOR.replace("description", {
			skin : "kama",
			width : 600,
			height : 400
		});
		
	});
</script>
</body>
</html>